package cn.tedu.account.service;

import cn.tedu.account.mapper.AccountMapper;
import cn.tedu.account.tcc.AccountTCCAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class AccountServiceImpl implements AccountService{

//    @Autowired
//    private AccountMapper accountMapper;

    @Autowired
    private AccountTCCAction accountTCCAction;

    @Override
    public void decrease(Long userId, BigDecimal money) {
//        accountMapper.decrease(userId, money);
        accountTCCAction.prepare(null, userId, money);
    }
}
